<script lang="ts" setup>
  import Alert from '@sscd/alert';
  const onClose = (e: MouseEvent) => console.log(e, 'I was closed.');
</script>

<template>
  <div class="demo">
    <div class="demo-title">可关闭的警告提示</div>
    <div class="demo-content">
      <Alert
        message="Warning Text Warning Text Warning TextW arning Text Warning Text Warning TextWarning Text"
        type="warning"
        closable
        @close="onClose"
      />
      <Alert
        class="mt12"
        message="Error Text"
        description="Error Description Error Description Error Description Error Description Error Description Error Description"
        type="error"
        closable
        @close="onClose"
      />
    </div>
  </div>
</template>

<style lang="less" scoped>
  .mt12 {
    margin-top: 12px;
  }
</style>
